package com.rd.student.jiaji.class3.wangyanbo.JulyTwelve;

import java.util.Scanner;

public class JinZiTa {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int i=scanner.nextInt();
        JinZiTa.jinZiTaInfo(i);
    }
    public static void jinZiTaInfo(int i){
        for (int a = 0; a < i; a++) {
            for (int b = 1; b < i - a; b++) {
                System.out.print(" ");
            }
            for (int c = 0; c < a * 2 + 1; c++) {
                System.out.print("*");
            }
            System.out.println();
        }

        int i1 = 1;
        int i2;
        for (int a = 0; a < i; a++) {

            for (int b = 1; b < i - a; b++) {
                System.out.print(" ");
            }
            for (int c = 0; c < a * 2 + 1; c++) {
                i2 = i1 - c;
                if (i2 <= 0) {
                    i2 = Math.abs(i2);
                    i2 += 2;

                }
                System.out.print(i2);
            }
            i1++;
            System.out.println();
        }
    }

}
